package hrms.dao;

import hrms.entity.Department;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;

import java.util.List;

@Mapper
@Repository
public interface DepartmentMapper {
    List<Department> selectAllDepartments();
    List<Department> selectByPostId();

    List<Department> selectDepartmentById(@Param("departmentId") Integer departmentId);
    void addDepartment(String departmentName, Integer managerId);
    int removeDepartment(Integer departmentId);
    int renameDepartment(Department department);
    int changeCurrentNum(Integer departmentId,Integer num);
    int changeManager(Integer departmentId,Integer managerId);

    Department findById(String id);
    Department selectDepartmentByName(String name);
    Department selectSingleDepartmentById(String id);
}
